package com.neusoft.bizcore.auth.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractModel;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@Entity
@Table(name = "bizcore_auth_dingconfig")
public class DingConfig extends AbstractModel {

    private static final long serialVersionUID = 1L;

    @NotBlank(message = "应用名称不能为空")
    @Length(max = 50, message = "应用名称不能超过{max}位")
    @Column(length = 50, nullable = false)
    private String name;

    @NotBlank(message = "企业ID不能为空")
    @Length(max = 255, message = "企业ID不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String corpId;

    @NotBlank(message = "AgentId不能为空")
    @Length(max = 50, message = "AgentId不能超过{max}位")
    @Column(length = 50, nullable = false)
    private String agentId;

    @NotBlank(message = "AppKey不能为空")
    @Length(max = 50, message = "AppKey不能超过{max}位")
    @Column(length = 50, nullable = false)
    private String appKey;

    @NotBlank(message = "AppKey不能为空")
    @Length(max = 255, message = "AppKey不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String appSecret;
}
